package com.jsjosem.aftersales.request;

import androidx.core.util.Consumer;

import com.jsjosem.aftersales.api.CustomerUserApi;
import com.jsjosem.aftersales.data.response.CustomerUserResponse;
import com.jsjosem.aftersales.data.response.PageResponse;

import retrofit2.Call;

public class CustomerUserRequest extends AsyncRequest<PageResponse<CustomerUserResponse>> {

    /*
     *
     * 获取客户联系人
     * */
    public void getCustomerUsers(int id, Consumer<PageResponse<CustomerUserResponse>> success, Consumer<? super Object> failed) {
        CustomerUserApi request = retrofit.create(CustomerUserApi.class);
        Call<PageResponse<CustomerUserResponse>> customerUsers = request.getCustomerUsers(id);
        sendRequest(customerUsers, success, failed);
    }


}
